<?php
class User
{
    const STATUS_NEW = 0;
    const STATUS_ACTIVE = 1;
    const STATUS_BANNED = 2;
    
    /**
     * id пользователя
     * @var int
     */
    private $id;
    
    /**
     * e-mail и логин пользователя
     * @var string
     */
    private $email;
    
    /**
     * пароль пользователя
     * @var string
     */
    private $password;
    
    /**
     * Статус пользователя
     * @var int
     */
    private $status;
    
    /**
     * хеш пользователя
     * @var string
     */
    private $hash;
    
    /**
     * дата регистрации
     * @var string
     */
    private $register_date;
    
    /**
     * дата последнего визита
     * @var string
     */
    private $last_visit_date;
    
    /**
     * Инициализация класса
     * @param $id
     * @param $email
     * @param $password
     * @param $hash
     * @param $register_date
     * @param $last_visit_date
     */
    public function __construct($id, $email, $password, $status, $hash, $register_date, $last_visit_date)
    {
        $this->id              = $id;
        $this->email           = $email;
        $this->password        = $password;
        $this->status          = $status;
        $this->hash            = $hash;
        $this->register_date   = $register_date;
        $this->last_visit_date = $last_visit_date;
    }
    
	/**
     * @return the $id
     */
    function getId()
    {
        return $this->id;
    }

	/**
     * @param $id the $id to set
     */
    function setId($id)
    {
        $this->id = $id;
    }

	/**
     * @return the $email
     */
    function getEmail()
    {
        return $this->email;
    }

	/**
     * @param $email the $email to set
     */
    function setEmail($email)
    {
        $this->email = $email;
    }

	/**
     * @return the $password
     */
    function getPassword()
    {
        return $this->password;
    }

	/**
     * @param $password the $password to set
     */
    function setPassword($password)
    {
        $this->password = $password;
    }
    
    /**
     * @return the $status
     */
    function getStatus()
    {
        return $this->status;
    }

    /**
     * @param $status the $status to set
     */
    function setStatus($status)
    {
        $this->status = (int)$status;
    }

	/**
     * @return the $hash
     */
    function getHash()
    {
        return $this->hash;
    }

	/**
     * @param $hash the $hash to set
     */
    function setHash($hash)
    {
        $this->hash = $hash;
    }

	/**
     * @return the $register_date
     */
    function getRegisterDate()
    {
        return $this->register_date;
    }

	/**
     * @param $register_date the $register_date to set
     */
    function setRegisterDate($register_date)
    {
        $this->register_date = $register_date;
    }

	/**
     * @return the $last_visit_date
     */
    function getLastVisitDate()
    {
        return $this->last_visit_date;
    }

	/**
     * @param $last_visit_date the $last_visit_date to set
     */
    function setLastVisitDate($last_visit_date)
    {
        $this->last_visit_date = $last_visit_date;
    }

}
?>